//test1.cpp
#include <iostream>
using namespace std;
int main()
{
    int space, rows;
    cout <<"Input rows: ";
    cin >> rows;
    if (rows>20){
        cout<<"To long!!!max 20 rows"<<endl;
        rows=20;
    }
    for(int i = 1, k = 0; i <= rows; ++i, k = 0){
        for(space = 1; space <= rows-i; ++space){
            cout <<" ";
        }
        while(k != 2*i-1){
            cout << "* ";
            ++k;
        }
    cout << endl;
    }
    return 0;
}
